package com.itheima.stock.controller;


import com.itheima.stock.api.StockControllerAPI;
import com.itheima.stock.entity.StockBusiness;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class StockController  implements StockControllerAPI {
    @Autowired
    private StockService stockService;


    @Override
    public ResponseResult<List<StockBusiness>> getStockBusiness() {
        List<StockBusiness> stockBusiness = stockService.getStockBusiness();
        return ResponseResult.ok(stockBusiness);

    }
}
